package com.ft.turorial.spring.boot.security.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ft.turorial.spring.boot.security.domain.Role;
import com.ft.turorial.spring.boot.security.mapper.RoleMapper;

@Service
public class RoleServiceImpl implements RoleService{
	@Autowired
	private RoleMapper roleMapper;
	@Override
	public List<Role> findByUserId(int userId) {
		return roleMapper.findByUserId(userId);
	}
	@Override
	public List<Role> findByUserName(String userName) {
		return roleMapper.findByUserName(userName);
	}
	@Override
	public List<String> findRoleCodesByUserName(String userName) {
		return roleMapper.findRoleCodesByUserName(userName);
	}
}
